import { defineStore } from "pinia"
import { ref } from "vue"
export const useMapStore = defineStore(
  "map",
  () => {
    //保存地图信息,持久化
    const mapState = ref({
      // 地图
      map: null,
      docLayer: new Zondy.Map.Doc("", "traffic", {
        ip: "localhost",
        port: 6163,
        crossOrigin: "Anonymous",
      }),
      dialogTableVisible: false,
      eventData: [],
    })

    return { mapState }
  } /* ,
{
  persist: {
    enabled: true,
    encryptionKey: "map",
    storage: localStorage,
  },
} */
)
